package com.indusfo.spc.untlis;

import com.indusfo.spc.pojo.User;
import org.apache.shiro.crypto.hash.Md5Hash;

/**
 * @author chenm
 * @create 2019-11-19 14:14
 */
public class PassWordSaltTest {
  public static void main(String[] args) {
    User user = new User();
    user.setUserName("xb");
    user.setUserPwd("123");
    user.setSalt("dd10fd");

    String encryptPassword = new Md5Hash(user.getUserName()+ user.getUserPwd()+user.getSalt()).toHex().toString();
    System.out.println(encryptPassword);
  }
}
